﻿<UserControl x:Class="cpe.cpein.UI.Controls.UCNews"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="600" d:DesignWidth="620" Loaded="UserControl_Loaded">
    <Grid Name="gridNews">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="10" />
            <ColumnDefinition />
            <ColumnDefinition />
            <ColumnDefinition />
            <ColumnDefinition />
            <ColumnDefinition />
            <ColumnDefinition />
            <ColumnDefinition Width="10" />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
        </Grid.RowDefinitions>

        <TextBlock Grid.Column="1" Grid.Row="0" Grid.ColumnSpan="1" Text="Actualités" HorizontalAlignment="Left" VerticalAlignment="Center" FontSize="18" />
        <Rectangle Grid.ColumnSpan="7" Grid.Column="1" Fill="#FFF4F4F5" Margin="0,10,10,0" Grid.Row="1" Grid.RowSpan="18" Stroke="Black" StrokeThickness="1" VerticalAlignment="Stretch"/>
        <Rectangle Grid.Column="1" Fill="LightGray" HorizontalAlignment="Left" Height="50" Margin="19,22,0,0" Grid.Row="1" Grid.RowSpan="3" Stroke="LightGray" VerticalAlignment="Top" Width="50"/>
        <Image Width="50" Height="50"  Margin="19,22,31,18" Name="imgCurrentUser" Grid.Column="1" Grid.Row="1" Grid.RowSpan="3"/>
        <TextBox Grid.Column="2" Grid.Row="1" Grid.ColumnSpan="5" TextWrapping="Wrap" Text="Partagez votre nouvelle..." FontSize="14" Margin="0,21,10,4" Name="tbxMyNews" Grid.RowSpan="2"/>
        <Button Grid.Column="6" Grid.Row="3" Content="Partagez" Margin="0,1,10,5" Name="btnShare" Click="btnShare_Click"/>
        <Button Grid.Column="5" Grid.Row="3" Content="Actualiser" Margin="0,0,10,6" Name="btnRefresh" Click="btnRefresh_Click"/>

        <DataGrid HeadersVisibility="None" SelectedValuePath="Id" RowHeight="30" IsReadOnly="True" AutoGenerateColumns="False" Name="MessageGrid" Background="White" Grid.Column="1" Grid.ColumnSpan="6" Grid.RowSpan="15" Margin="10,0,10,20" Grid.Row="4" VerticalAlignment="Stretch" BorderThickness="0">
            <DataGrid.Columns>
                <DataGridTextColumn Binding="{Binding Id}" FontSize="16" Visibility="Hidden"/>
                <DataGridTextColumn Binding="{Binding Sender.Name}" FontSize="16" MinWidth="200" />
                <DataGridTextColumn Binding="{Binding Sender.Lastname}" FontSize="16" MinWidth="200" />
                <DataGridTextColumn Binding="{Binding Content}" FontSize="16" MinWidth="200" />
                <DataGridTextColumn Binding="{Binding Date}" FontSize="16" MinWidth="200" />
            </DataGrid.Columns>
        </DataGrid>
    </Grid>
</UserControl>
